#ifndef __USART_H
#define __USART_H

#include "stdio.h"
#include "stm32f4xx_conf.h"
#include "sys.h"

#define BSP_USART               USART1
#define BSP_USART_TX_PORT       GPIOA
#define BSP_USART_TX_PIN        GPIO_Pin_9
#define BSP_USART_RX_PORT       GPIOA
#define BSP_USART_RX_PIN        GPIO_Pin_10
#define BSP_USART_AF            GPIO_AF_USART1
#define BSP_USART_TX_AF_PIN     GPIO_PinSource9
#define BSP_USART_RX_AF_PIN     GPIO_PinSource10

void uart_init(uint32_t baudrate);
uint8_t rx_buffer_pop(uint8_t *data);

#endif


